<template>
	<view class="home">
		<view class="out">
			<view class="row" v-for="item in nameArr" :key="item._id">姓名:{{ item.name }}</view>
		</view>
	</view>
</template>
<script>
	export default{
		data(){
			return {
				title:'hello',
				nameArr:[],
			}
		},
		// 页面加载进来就是加载这个函数 类似created()
		onLoad(){
			this.getData()
		},
		methods:{
			getData(){
				uniCloud.callFunction({
					name:"cloudDemoGet"
				}).then(res=>this.nameArr=res.result.data)
			}
		}
	}
</script>
<style scoped>
	.out{
		padding: 30rpx;
		.row{
			border-bottom: 1px solid #ccc;
			padding:20rpx 0;
		}
	}
</style>